/*
 * @(#)UserForm.java 2019年9月26日 下午12:14:28
 * Copyright 2019 zmr, Inc. All rights reserved. 
 * PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.dev.bbs.form;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import lombok.Data;

/**
 * <p>File：UserForm.java</p>
 * <p>Title: </p>
 * <p>Description:</p>
 * <p>Copyright: Copyright (c) 2019 2019年9月26日 下午12:14:28</p>
 * <p>Company: zmrit.com </p>
 * @author zmr
 * @version 1.0
 */
@Data
public class UserForm
{
    public interface UserInfoGroup
    {
    }

    public interface RepassGroup
    {
    }

    @NotNull(message = "昵称不能为空", groups = {UserInfoGroup.class})
    private String  nickname;

    @NotNull(message = "性别不能为空", groups = {UserInfoGroup.class})
    private String  sex;

    @Size(min = 1, max = 5, message = "城市名称1-5个字", groups = {UserInfoGroup.class})
    private String  city;

    @Min(value = 18, message = "18禁", groups = {UserInfoGroup.class})
    @Max(value = 100, message = "年龄太大了", groups = {UserInfoGroup.class})
    @NotNull(message = "年龄不能为空", groups = {UserInfoGroup.class})
    private Integer age;

    private String  sign;

    @Size(min = 6, max = 16, message = "密码6-16个字符", groups = {RepassGroup.class})
    @NotNull(message = "旧密码不能为空", groups = {RepassGroup.class})
    private String  nowpass;

    @Size(min = 6, max = 16, message = "密码6-16个字符", groups = {RepassGroup.class})
    @NotNull(message = "新密码不能为空", groups = {RepassGroup.class})
    private String  newpass;
}
